import warnings

warnings.filterwarnings('ignore')
from ultralytics import YOLO

if __name__ == '__main__':
    model = YOLO('yolov8x.pt')  # select your model.pt path
    model.predict(source=r"E:\数据集\鸟类数据集\Kaggle-Birds Flying\4_Birds\BirdsFlying_1.jpg",
                  imgsz=640,
                  project='runs/detect',
                  name='exp',
                  save=True,
                  save_txt=True,
                  save_conf=True,
                  # stream=True  # 当source为网络链接、摄像头地址时，stream=True
                  # visualize=True # visualize model features maps
                  )
